The statements in this section merely provide background information related to the present disclosure and may not constitute prior art.
In video encoding, when an image is encoded and then reconstructed in units of blocks, distortion occurs in block boundaries due to block-unit prediction and quantization. The phenomenon that distortion occurs in block boundaries is referred to as blocking artifact.
In the existing video encoding standards, such as MPEG-1, MPEG-2, and H.263, a reconstructed image is stored in a reference picture memory, without processing blocking artifact. Therefore, a subjective video quality of an image is degraded. Furthermore, referencing an image containing blocking artifact during a motion compensation leads to video quality degradation accumulated in an encoded image. The consequence of letting an image with the video quality degradation is reduction of the encoding efficiency.
In order to solve these problems, the conventional H.264/AVC attempts to minimize blocking artifact by applying a deblocking filter before storing a reconstructed image in a picture memory. In this manner, the conventional H.264/AVC increases a subjective video quality and improves encoding efficiency through a more accurate signal prediction. However, if deblocking filtering is performed on an image showing no blocking artifact, unnecessary computation increases and unintended video quality degradation may unnecessarily occur. Therefore, in order to perform deblocking filtering more effectively, it is necessary to adaptively perform different levels of deblocking filtering according to the degree of blocking artifact.
The H.264/AVC standard adaptively performs the deblocking filtering according to the degree of the blocking artifact. That is, a boundary strength (BS) value for determining filtering strength is determined, and a different level of deblocking filtering is performed according to the determined BS value. The BS value ranges from 0 to 4. As the BS value is larger, it is necessary to perform stronger deblocking filtering. That is, when the BS value is 0, no deblocking filtering is performed. When the filtering strength value is 4, the strongest deblocking filtering is performed.
A deblocking filtering method of the H.264/AVC standard, which is the conventional technology using the deblocking filtering, will be described below in detail.
FIG. 1 shows a block unit and sequence to which deblocking filtering used in the conventional H.264/AVC standard is applied.
The H.264/AVC standard determines the block unit to which deblocking filtering is applied according to a transform block. That is, if a transform block of 4×4 unit is used, a block to which deblocking filtering is applied also becomes 4×4 unit. The H.264/AVC standard may use a transform block of 8×8 unit, as well as the transform block of 4×4 unit. Therefore, if the transform block of 8×8 unit is used, a block to which deblocking filtering is applied also becomes 8×8 unit. For convenience of description, FIG. 1 assumes the case of using the transform block of 4×4 unit.
Referring to FIG. 1, deblocking filtering is performed on a luma signal block of 16×16 unit in the orders of vertical directions a, b, c and d of 4×4 unit and horizontal directions e, f, g and h of 4×4 unit. In a similar manner to the luma signal block, deblocking filtering is performed on a chroma signal block of 8×8 unit in the orders of vertical directions i and j of 4×4 unit and horizontal directions k and l of 4×4 unit.
FIG. 2 shows pixels p0, p1, p2 and p3 and pixels q0, q1, q2 and q3 of neighboring blocks P and Q for determining BS, and FIG. 3 shows a process of determining a BS in the H.264/AVC standard.
Referring to FIG. 3, it is determined whether the block P or Q shown in FIG. 2 is an intra prediction block (S310). When the block P or Q is the intra prediction block, it is determined whether the pixels p0 and q0 are located at a macroblock boundary (S320). When the pixels p0 and q0 are located at the macroblock boundary, BS value is 4. On the other hand, when the pixels p0 and q0 are not located at the macroblock boundary, BS value is 3.
When step S310 determines that both of the blocks P and Q are the inter mode, it is determined whether a nonzero transform coefficient of residual data exists in the block where the pixel p0 or q0 is located (S330). When the nonzero transform coefficient exists, BS value is 2.
However, when the nonzero transform coefficient does not exist, BS value is 1 in the case where the pixels p0 and q0 use different reference pictures or have different motion vector values; otherwise, BS value is 0 (S340).
That is, in order to selectively remove distortion between blocks, which is caused by block-unit prediction and quantization, the H.264/AVC standard selectively uses deblocking filters having different strengths, considering quantization parameter (QP), encoding mode, motion information (reference picture, motion vector).
The H.264/AVC standard performs the selective deblocking filtering on the inter prediction block, additionally considering the motion information and the like. However, with respect to the intra prediction block, the H.264/AVC standard merely references whether the intra prediction block is the boundary of the macroblock, and does not perform the selective deblocking filtering considering the intra prediction information. Therefore, in order to perform a further improved deblocking filtering on the intra prediction block, there is a need for a method that adaptively performs deblocking filtering according to intra prediction information.